get last 4 character c#

120

get last 4 character c# -

string mystring = "Hellopeople";
string lastFour =  mystring.Substring(mystring.Length - 4 , 4);

Console.WriteLine(lastFour);

Comments

Submit
0 Comments